<div class="ibox-content">
    <form id="signupForm" class="form-horizontal m-t" method="post" action="{:\\think\\Url::build('AuthManager/writeGroup')}">
        <div class="form-group input-large">
            <label class=" control-label">组名<span class="check-tips">(用于分组显示)</span></label>
            <input  class="form-control" type="text" name="title" value="{$info.title|default=''}">
        </div>
        <div class="form-group">
            <label class="control-label">说明：<span class="check-tips">(请按照导入格式输入)</span></label>
            <textarea name="description" class="form-control" rows="4">{$info.description|default=''}</textarea>
        </div>
        <div class="form-group">
            <input type="hidden" name="id" value="{$info.id|default=''}">
            <button class="btn btn-primary" type="submit">提交</button>
        </div>
    </form>
</div>
<script type="text/javascript" src="__JS__/plugins/validate/jquery.validate.min.js"></script>
<script type="text/javascript">
    $("#signupForm").validate({
            rules: {
                title: {
                    required: true,
                    minlength: 2,
                    maxlength:20
                }            
            },
            messages: {
                title: {
                    required: "标题不能为空",
                    minlength: "标题至少2个字符",
                    maxlength:"标题不能超过20个字符"
                }
            },
            submitHandler: function () {
                validateAjax("#signupForm","button[type='submit']");
                return false;
            }
        });

</script>
